package com.wenmingliang.demo1;

import java.util.Random;

/**
 * @author wenmingliang
 * @create 2023/3/29
 */


public class Solution {


    public static String judge(String num) {

        String result = "NO";
        String a = num + "";
        int b = 0, c = 0;
        int result1 = 1, result2 = 1;
        char[] num1 = a.toCharArray();

        for (int i = 0; i < a.length() / 2; i++) {

            result1 *= num1[i];
        }

        for (int i = a.length() - 1; i >= a.length() / 2; i--) {
            result2 *= num1[i];
        }

        if (result1 == result2) {
            result = "YES";
        }


        return result;
    }

    public static  void main(String[] args) {
        int t = 1000000000;
        long startTime = System.currentTimeMillis();
        System.out.println(judge("46456544"));
        long endTime = System.currentTimeMillis();

        System.out.println(endTime - startTime);


    }

}
